{% extends 'user/base_login_regidter.html' %}

{% block title %}用户登录{% endblock %}

{% block form %}
     <h2>🎵 欢迎回来</h2>
     <form action="" method="post">
         {% csrf_token %}
            <div class="form-group">
                <label for="id_username">用户名</label>
                <input type="text" name="username" id="id_username" class="form-control" placeholder="请输入用户名" required>
                {% if form.username.errors %}
                    {% for error in form.username.errors  %}
                        <p class="text-danger">{{ error }}</p>
                    {% endfor %}
                {% endif %}
            </div>
            <div class="form-group">
                <label for="id_password">密码</label>
                <input type="password" name="password" id="id_password" class="form-control" placeholder="请输入密码" required>
                {% if form.password.errors %}
                    {% for error in form.password.errors  %}
                        <p class="text-danger">{{ error }}</p>
                    {% endfor %}
                {% endif %}
            </div>

            <div class="auth-buttons">
                <button type="submit" class="btn-primary">🚀 登录</button>
                <a href="{% url 'user:register' %}" class="btn-secondary">📝 注册</a>
            </div>
        </form>

{% endblock %}